﻿@using iPanel.Model
@using iPanel.Resources

@{
    // Create view model every render. The resource state may have changed.
    var vm = ResourceStateViewModel.GetStateViewModel(Resource, Loc);
}

<div class="state-column-cell">

    <FluentIcon Value="@vm.Icon"
                Color="@vm.Color"
                Class="severity-icon" />

    <span>@vm.Text</span>

    <UnreadLogErrorsBadge
        UnviewedErrorCounts="UnviewedErrorCounts"
        Resource="@Resource" />

</div>
